package test_Component;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class UIJFrame {
	private static JFrame jfram;
	private static JPanel jpanel;

	private UIJFrame() {
	}

	public static JPanel getJPanel() {

		if (jfram == null) {
			jfram = new JFrame();
			jfram.setSize(500, 500);
			jfram.setLocationRelativeTo(null);
			jfram.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
			// jfram.show(); //deprecated
			// jfram.show(true); //deprecated
			jfram.setVisible(true);
			jpanel = new JPanel();
			jfram.getContentPane().add(jpanel);

		}
		return jpanel;
	}
}
